<?php
namespace app\index\controller;
use think\Controller;
use think\Db; 
use other\Aes;
use think\Cookie;
use think\Request;
use app\index\model\KnowUser;



class Common  extends Controller
{
	private $userData = [];

	public function __construct(){
		parent::__construct();
		$user = user();
		if ($user){
			$userData = KnowUser::getUserOne($user['phone']);
			$userData['nickname'] = $userData['know_nickname'] ?: checkNickname($user['phone']);
			$this->userData = $userData;
		}
		$this->assign('user', $user);
		$this->assign('edition', '1.1.4');
		$this->assign('userData', $this->userData);
		$this->assign('redirects','http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
	}


	public function checkLogin(){
		$user = user();
	}

	public function checkParamId(){
		return $this->fetch('/404',['title'=>'404']);
	}
}